<template>
	<xbd-pages-content title="个人资料">
		<template #content>
			<view class="personal-data">
				<view class="top">
					<data-row title="头像" :content="userInfo.user_avatar | imgFormat" isImg></data-row>
					<data-row title="姓名" :content="userInfo.user_name  || '-'"></data-row>
					<data-row title="部门" :content="userInfo.user_department  || '-'"></data-row>
					<data-row title="岗位/职位" :content="userInfo.user_job  || '-'" ></data-row>
					<data-row title="电话" :content="userInfo.user_phone  || '-'" color="#394954"></data-row>
					<data-row title="身份证" :content="userInfo.user_idcard || '-' | IDCardFormat"></data-row>
					<!-- <data-row title="车牌号" :content="userInfo.user_plate || '-'" isArrow color="#394954" @clickRow="clickRow"></data-row> -->
				</view>
			</view>
		</template>
	</xbd-pages-content>
</template>

<script>
	import DataRow from '@/components/personalcenter/DataRow.vue';
	import { mapState } from 'vuex';
	export default {
		data() {
			return {};
		},
		components: {
			DataRow
		},
		computed: {
			...mapState(['userInfo'])
		},
		methods: {
			clickRow() {
				uni.navigateTo({
					url: './editdata',
					success: res => {},
					fail: () => {},
					complete: () => {}
				});
			}
		}
	}
</script>

<style lang="scss" scoped>
	::v-deep .data-row{
		padding: 0 20rpx !important;
	}
	.personal-data {
		.top {
			padding: 0 50rpx;
			
			background-color: #FFFFFF;
		}
	}
</style>
